#include "ViewFactory.h"
#include <iostream>
#include <Windows.h>
#include <gl/glut.h>

void ViewFactory::getDefaultView()
{
	getView(VIEW_TWO, nullptr);
}
void ViewFactory::getView(int i, Turret* t) 
{ 
	switch(i)
	{
	case VIEW_ONE:
		break;
	case VIEW_TWO:
		glMatrixMode(GL_MODELVIEW); 
		glLoadIdentity();
		gluLookAt(50, 200, 750, 50, 600, 0, 0, 1, 150);
		glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		gluPerspective(120, 1, 1, 1000000);
		break;
	case VIEW_THREE:
		glMatrixMode(GL_MODELVIEW);
		glLoadIdentity();
		gluLookAt(0, 1000, 0, 0, 0, 0, 0, 0, -1);
		glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		glOrtho(-2000, 2000, -2000, 2000, 10, 50000);
		break;
	case VIEW_FOUR:
		glMatrixMode(GL_MODELVIEW);
		glLoadIdentity();
		gluLookAt(600, 20, 200, 50, 20, 200, 0, 1, 0);
		glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		gluPerspective(120, 1, 1, 10000000000);
		break;
	default:
		break;
	}
}